#include <stdio.h>
#include <omp.h>
#include <time.h>
#include <stdlib.h>
//编译指令
//gcc -std=c99 -fopenmp 14RuntimeLibraryFunctions.c -o cmake-build/14RuntimeLibraryFunctions && export OMP_NUM_THREADS=512 && time ./cmake-build/14RuntimeLibraryFunctions


int main()
{
    //omp_set_num_threads(omp_get_num_procs());
    printf("%d\n",omp_get_num_procs());
    printf("%d\n",omp_get_max_threads());
    for(int i=0;i<5;++i)
        printf("%d\n",omp_in_parallel());
    
    #pragma omp parallel for default(none)
    for(int i=0;i<5;++i)
        printf("%d\n",omp_in_parallel());
    
    return 0;
}
